Bridge IoT Hub

Device

createDevice

Create a digital image of a device and link it to the IoT platform

This method allows machine controls to be represented as a device in the IoT platform and thus the transferred process parameters to be placed in relation to a specific workplace and the operations executed on it. For this purpose, a new device is created in the IoT platform and assigned to a workplace. Furthermore, it is possible to link to both the telemetric data transmitted online and the telemetric data recorded in the past. Both are specified as externalDataSources when the device is created.


/devices

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/devices"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DeviceApi;

import java.io.File;
import java.util.*;

public class DeviceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        DeviceApi apiInstance = new DeviceApi();
        DeviceCreationRequestBody device = ; // DeviceCreationRequestBody | The properties of the device to be created
        try {
            device result = apiInstance.createDevice(device);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeviceApi#createDevice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DeviceApi;

public class DeviceApiExample {

    public static void main(String[] args) {
        DeviceApi apiInstance = new DeviceApi();
        DeviceCreationRequestBody device = ; // DeviceCreationRequestBody | The properties of the device to be created
        try {
            device result = apiInstance.createDevice(device);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DeviceApi#createDevice");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

DeviceCreationRequestBody *device = ; // The properties of the device to be created

DeviceApi *apiInstance = [[DeviceApi alloc] init];

// Create a digital image of a device and link it to the IoT platform
[apiInstance createDeviceWith:device
              completionHandler: ^(device output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.DeviceApi()

var device = ; // {DeviceCreationRequestBody} The properties of the device to be created


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createDevice(device, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createDeviceExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new DeviceApi();
            var device = new DeviceCreationRequestBody(); // DeviceCreationRequestBody | The properties of the device to be created

            try
            {
                // Create a digital image of a device and link it to the IoT platform
                device result = apiInstance.createDevice(device);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeviceApi.createDevice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\DeviceApi();
$device = ; // DeviceCreationRequestBody | The properties of the device to be created

try {
    $result = $api_instance->createDevice($device);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DeviceApi->createDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DeviceApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::DeviceApi->new();
my $device = WWW::SwaggerClient::Object::DeviceCreationRequestBody->new(); # DeviceCreationRequestBody | The properties of the device to be created

eval { 
    my $result = $api_instance->createDevice(device => $device);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DeviceApi->createDevice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.DeviceApi()
device =  # DeviceCreationRequestBody | The properties of the device to be created

try: 
    # Create a digital image of a device and link it to the IoT platform
    api_response = api_instance.create_device(device)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DeviceApi->createDevice: %s\n" % e)

Parameters

Body parameters
Name Description
device *

Responses

Status: 201 - Device created

Name Type Format Description
Location String Path to the device

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error


Operation

assignOutputQuantity

Post output quantity to an operation by specifying quality details

Allows the output quantity to be assigned to an operation and to be classified as a yield, output menu, or rework quantity. In order to post the output quantity of a workplace to an operation, it must be classified as yield, scrap, or rework. In the case of scrap and rework, it is also required to specify quality details (scrap reason, rework reason).


/operations/{operationId}/qualityDetails

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/operations/{operationId}/qualityDetails"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OperationApi;

import java.io.File;
import java.util.*;

public class OperationApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        OperationApi apiInstance = new OperationApi();
        String operationId = operationId_example; // String | UUID of an operation
        QuantityAssignmentRequestBody operationQuanity = ; // QuantityAssignmentRequestBody | operationQuanity
        try {
            apiInstance.assignOutputQuantity(operationId, operationQuanity);
        } catch (ApiException e) {
            System.err.println("Exception when calling OperationApi#assignOutputQuantity");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OperationApi;

public class OperationApiExample {

    public static void main(String[] args) {
        OperationApi apiInstance = new OperationApi();
        String operationId = operationId_example; // String | UUID of an operation
        QuantityAssignmentRequestBody operationQuanity = ; // QuantityAssignmentRequestBody | operationQuanity
        try {
            apiInstance.assignOutputQuantity(operationId, operationQuanity);
        } catch (ApiException e) {
            System.err.println("Exception when calling OperationApi#assignOutputQuantity");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *operationId = operationId_example; // UUID of an operation
QuantityAssignmentRequestBody *operationQuanity = ; // operationQuanity (optional)

OperationApi *apiInstance = [[OperationApi alloc] init];

// Post output quantity to an operation by specifying quality details
[apiInstance assignOutputQuantityWith:operationId
    operationQuanity:operationQuanity
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.OperationApi()

var operationId = operationId_example; // {String} UUID of an operation

var opts = { 
  'operationQuanity':  // {QuantityAssignmentRequestBody} operationQuanity
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.assignOutputQuantity(operationId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class assignOutputQuantityExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OperationApi();
            var operationId = operationId_example;  // String | UUID of an operation
            var operationQuanity = new QuantityAssignmentRequestBody(); // QuantityAssignmentRequestBody | operationQuanity (optional) 

            try
            {
                // Post output quantity to an operation by specifying quality details
                apiInstance.assignOutputQuantity(operationId, operationQuanity);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OperationApi.assignOutputQuantity: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OperationApi();
$operationId = operationId_example; // String | UUID of an operation
$operationQuanity = ; // QuantityAssignmentRequestBody | operationQuanity

try {
    $api_instance->assignOutputQuantity($operationId, $operationQuanity);
} catch (Exception $e) {
    echo 'Exception when calling OperationApi->assignOutputQuantity: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OperationApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OperationApi->new();
my $operationId = operationId_example; # String | UUID of an operation
my $operationQuanity = WWW::SwaggerClient::Object::QuantityAssignmentRequestBody->new(); # QuantityAssignmentRequestBody | operationQuanity

eval { 
    $api_instance->assignOutputQuantity(operationId => $operationId, operationQuanity => $operationQuanity);
};
if ($@) {
    warn "Exception when calling OperationApi->assignOutputQuantity: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OperationApi()
operationId = operationId_example # String | UUID of an operation
operationQuanity =  # QuantityAssignmentRequestBody | operationQuanity (optional)

try: 
    # Post output quantity to an operation by specifying quality details
    api_instance.assign_output_quantity(operationId, operationQuanity=operationQuanity)
except ApiException as e:
    print("Exception when calling OperationApi->assignOutputQuantity: %s\n" % e)

Parameters

Path parameters
Name Description
operationId*
String
UUID of an operation
Required
Body parameters
Name Description
operationQuanity

Responses

Status: 202 - Quantity assignment and quality details accepted

Status: 204 - Quantity assigned and quality details updated

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error


updateOperationPhase

Update the current phase of an operation

This method allows a machine controller or a reporting employee to inform the IoT platform that an operation has changed its phase.


/operations/{operationId}/{operationPhaseId}

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/operations/{operationId}/{operationPhaseId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OperationApi;

import java.io.File;
import java.util.*;

public class OperationApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        OperationApi apiInstance = new OperationApi();
        String operationId = operationId_example; // String | UUID of an operation
        String operationPhaseId = operationPhaseId_example; // String | ID of the operation phase to which the operation changes.
        OperationPhaseUpdateRequestBody additionalDetails = ; // OperationPhaseUpdateRequestBody | If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored.
        try {
            operation result = apiInstance.updateOperationPhase(operationId, operationPhaseId, additionalDetails);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OperationApi#updateOperationPhase");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OperationApi;

public class OperationApiExample {

    public static void main(String[] args) {
        OperationApi apiInstance = new OperationApi();
        String operationId = operationId_example; // String | UUID of an operation
        String operationPhaseId = operationPhaseId_example; // String | ID of the operation phase to which the operation changes.
        OperationPhaseUpdateRequestBody additionalDetails = ; // OperationPhaseUpdateRequestBody | If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored.
        try {
            operation result = apiInstance.updateOperationPhase(operationId, operationPhaseId, additionalDetails);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OperationApi#updateOperationPhase");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *operationId = operationId_example; // UUID of an operation
String *operationPhaseId = operationPhaseId_example; // ID of the operation phase to which the operation changes.
OperationPhaseUpdateRequestBody *additionalDetails = ; // If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored. (optional)

OperationApi *apiInstance = [[OperationApi alloc] init];

// Update the current phase of an operation
[apiInstance updateOperationPhaseWith:operationId
    operationPhaseId:operationPhaseId
    additionalDetails:additionalDetails
              completionHandler: ^(operation output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.OperationApi()

var operationId = operationId_example; // {String} UUID of an operation

var operationPhaseId = operationPhaseId_example; // {String} ID of the operation phase to which the operation changes.

var opts = { 
  'additionalDetails':  // {OperationPhaseUpdateRequestBody} If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateOperationPhase(operationId, operationPhaseId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateOperationPhaseExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new OperationApi();
            var operationId = operationId_example;  // String | UUID of an operation
            var operationPhaseId = operationPhaseId_example;  // String | ID of the operation phase to which the operation changes.
            var additionalDetails = new OperationPhaseUpdateRequestBody(); // OperationPhaseUpdateRequestBody | If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored. (optional) 

            try
            {
                // Update the current phase of an operation
                operation result = apiInstance.updateOperationPhase(operationId, operationPhaseId, additionalDetails);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OperationApi.updateOperationPhase: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\OperationApi();
$operationId = operationId_example; // String | UUID of an operation
$operationPhaseId = operationPhaseId_example; // String | ID of the operation phase to which the operation changes.
$additionalDetails = ; // OperationPhaseUpdateRequestBody | If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored.

try {
    $result = $api_instance->updateOperationPhase($operationId, $operationPhaseId, $additionalDetails);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OperationApi->updateOperationPhase: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OperationApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::OperationApi->new();
my $operationId = operationId_example; # String | UUID of an operation
my $operationPhaseId = operationPhaseId_example; # String | ID of the operation phase to which the operation changes.
my $additionalDetails = WWW::SwaggerClient::Object::OperationPhaseUpdateRequestBody->new(); # OperationPhaseUpdateRequestBody | If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored.

eval { 
    my $result = $api_instance->updateOperationPhase(operationId => $operationId, operationPhaseId => $operationPhaseId, additionalDetails => $additionalDetails);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OperationApi->updateOperationPhase: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.OperationApi()
operationId = operationId_example # String | UUID of an operation
operationPhaseId = operationPhaseId_example # String | ID of the operation phase to which the operation changes.
additionalDetails =  # OperationPhaseUpdateRequestBody | If the change of the operation phase involves the logon to a workplace or the operation changes the workplace, enter the UUID of the new workplace here. In the case of a manual phase change in the Shop Floor Terminal, the UUID of the reporting employee can optionally be stored. (optional)

try: 
    # Update the current phase of an operation
    api_response = api_instance.update_operation_phase(operationId, operationPhaseId, additionalDetails=additionalDetails)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OperationApi->updateOperationPhase: %s\n" % e)

Parameters

Path parameters
Name Description
operationId*
String
UUID of an operation
Required
operationPhaseId*
String
ID of the operation phase to which the operation changes.
Required
Body parameters
Name Description
additionalDetails

Responses

Status: 200 - OK

Status: 202 - Operation phase accepted

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error


Workplace

postClassifiedOutputQuantities

Post classified output quantities of a machine or a manual workplace

The HTTP method offers an alternative to transferring output quantity that has already been classified as yield, scrap, or rework from a workplace to the IoT platform via MQTT. It uses the same data structure, whereby workplaceId can be omitted when transferring via HTTP.


/workplaces/{workplaceId}/classifiedOutputQuantities

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/workplaces/{workplaceId}/classifiedOutputQuantities"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkplaceApi;

import java.io.File;
import java.util.*;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        ClassifiedOutputQuantitiesPostRequestBody classifiedOutputQuantities = ; // ClassifiedOutputQuantitiesPostRequestBody | The classified quantity to be posted
        try {
            apiInstance.postClassifiedOutputQuantities(workplaceId, classifiedOutputQuantities);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#postClassifiedOutputQuantities");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkplaceApi;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        ClassifiedOutputQuantitiesPostRequestBody classifiedOutputQuantities = ; // ClassifiedOutputQuantitiesPostRequestBody | The classified quantity to be posted
        try {
            apiInstance.postClassifiedOutputQuantities(workplaceId, classifiedOutputQuantities);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#postClassifiedOutputQuantities");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workplaceId = workplaceId_example; // UUID of a workplace
ClassifiedOutputQuantitiesPostRequestBody *classifiedOutputQuantities = ; // The classified quantity to be posted

WorkplaceApi *apiInstance = [[WorkplaceApi alloc] init];

// Post classified output quantities of a machine or a manual workplace
[apiInstance postClassifiedOutputQuantitiesWith:workplaceId
    classifiedOutputQuantities:classifiedOutputQuantities
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.WorkplaceApi()

var workplaceId = workplaceId_example; // {String} UUID of a workplace

var classifiedOutputQuantities = ; // {ClassifiedOutputQuantitiesPostRequestBody} The classified quantity to be posted


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.postClassifiedOutputQuantities(workplaceId, classifiedOutputQuantities, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postClassifiedOutputQuantitiesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkplaceApi();
            var workplaceId = workplaceId_example;  // String | UUID of a workplace
            var classifiedOutputQuantities = new ClassifiedOutputQuantitiesPostRequestBody(); // ClassifiedOutputQuantitiesPostRequestBody | The classified quantity to be posted

            try
            {
                // Post classified output quantities of a machine or a manual workplace
                apiInstance.postClassifiedOutputQuantities(workplaceId, classifiedOutputQuantities);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkplaceApi.postClassifiedOutputQuantities: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkplaceApi();
$workplaceId = workplaceId_example; // String | UUID of a workplace
$classifiedOutputQuantities = ; // ClassifiedOutputQuantitiesPostRequestBody | The classified quantity to be posted

try {
    $api_instance->postClassifiedOutputQuantities($workplaceId, $classifiedOutputQuantities);
} catch (Exception $e) {
    echo 'Exception when calling WorkplaceApi->postClassifiedOutputQuantities: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkplaceApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkplaceApi->new();
my $workplaceId = workplaceId_example; # String | UUID of a workplace
my $classifiedOutputQuantities = WWW::SwaggerClient::Object::ClassifiedOutputQuantitiesPostRequestBody->new(); # ClassifiedOutputQuantitiesPostRequestBody | The classified quantity to be posted

eval { 
    $api_instance->postClassifiedOutputQuantities(workplaceId => $workplaceId, classifiedOutputQuantities => $classifiedOutputQuantities);
};
if ($@) {
    warn "Exception when calling WorkplaceApi->postClassifiedOutputQuantities: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkplaceApi()
workplaceId = workplaceId_example # String | UUID of a workplace
classifiedOutputQuantities =  # ClassifiedOutputQuantitiesPostRequestBody | The classified quantity to be posted

try: 
    # Post classified output quantities of a machine or a manual workplace
    api_instance.post_classified_output_quantities(workplaceId, classifiedOutputQuantities)
except ApiException as e:
    print("Exception when calling WorkplaceApi->postClassifiedOutputQuantities: %s\n" % e)

Parameters

Path parameters
Name Description
workplaceId*
String
UUID of a workplace
Required
Body parameters
Name Description
classifiedOutputQuantities *

Responses

Status: 202 - Machine quantities accepted

Status: 204 - Machine quantities posted

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error


postCounterIncrements

Post machine counter increments

The HTTP method offers an alternative to transferring counter increments from the machine controller to the IoT platform via MQTT. It uses the same data structure, whereby workplaceId can be omitted when transferring via HTTP.


/workplaces/{workplaceId}/counterIncrements

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/workplaces/{workplaceId}/counterIncrements"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkplaceApi;

import java.io.File;
import java.util.*;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        MachineCounterIncrementsPostRequestBody machineCounterIncrements = ; // MachineCounterIncrementsPostRequestBody | The machine counter increments to be posted
        try {
            apiInstance.postCounterIncrements(workplaceId, machineCounterIncrements);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#postCounterIncrements");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkplaceApi;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        MachineCounterIncrementsPostRequestBody machineCounterIncrements = ; // MachineCounterIncrementsPostRequestBody | The machine counter increments to be posted
        try {
            apiInstance.postCounterIncrements(workplaceId, machineCounterIncrements);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#postCounterIncrements");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workplaceId = workplaceId_example; // UUID of a workplace
MachineCounterIncrementsPostRequestBody *machineCounterIncrements = ; // The machine counter increments to be posted

WorkplaceApi *apiInstance = [[WorkplaceApi alloc] init];

// Post machine counter increments
[apiInstance postCounterIncrementsWith:workplaceId
    machineCounterIncrements:machineCounterIncrements
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.WorkplaceApi()

var workplaceId = workplaceId_example; // {String} UUID of a workplace

var machineCounterIncrements = ; // {MachineCounterIncrementsPostRequestBody} The machine counter increments to be posted


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.postCounterIncrements(workplaceId, machineCounterIncrements, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postCounterIncrementsExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkplaceApi();
            var workplaceId = workplaceId_example;  // String | UUID of a workplace
            var machineCounterIncrements = new MachineCounterIncrementsPostRequestBody(); // MachineCounterIncrementsPostRequestBody | The machine counter increments to be posted

            try
            {
                // Post machine counter increments
                apiInstance.postCounterIncrements(workplaceId, machineCounterIncrements);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkplaceApi.postCounterIncrements: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkplaceApi();
$workplaceId = workplaceId_example; // String | UUID of a workplace
$machineCounterIncrements = ; // MachineCounterIncrementsPostRequestBody | The machine counter increments to be posted

try {
    $api_instance->postCounterIncrements($workplaceId, $machineCounterIncrements);
} catch (Exception $e) {
    echo 'Exception when calling WorkplaceApi->postCounterIncrements: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkplaceApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkplaceApi->new();
my $workplaceId = workplaceId_example; # String | UUID of a workplace
my $machineCounterIncrements = WWW::SwaggerClient::Object::MachineCounterIncrementsPostRequestBody->new(); # MachineCounterIncrementsPostRequestBody | The machine counter increments to be posted

eval { 
    $api_instance->postCounterIncrements(workplaceId => $workplaceId, machineCounterIncrements => $machineCounterIncrements);
};
if ($@) {
    warn "Exception when calling WorkplaceApi->postCounterIncrements: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkplaceApi()
workplaceId = workplaceId_example # String | UUID of a workplace
machineCounterIncrements =  # MachineCounterIncrementsPostRequestBody | The machine counter increments to be posted

try: 
    # Post machine counter increments
    api_instance.post_counter_increments(workplaceId, machineCounterIncrements)
except ApiException as e:
    print("Exception when calling WorkplaceApi->postCounterIncrements: %s\n" % e)

Parameters

Path parameters
Name Description
workplaceId*
String
UUID of a workplace
Required
Body parameters
Name Description
machineCounterIncrements *

Responses

Status: 202 - Machine counter increments accepted

Status: 204 - Machine counter increments posted

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error


postMachineCycles

Post machine cycles

The HTTP method offers an alternative to transferring machine cycles from the machine to the IoT platform via MQTT. It uses the same data structure, whereby workplaceId can be omitted when transferring via HTTP.


/workplaces/{workplaceId}/machineCycles

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/workplaces/{workplaceId}/machineCycles"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkplaceApi;

import java.io.File;
import java.util.*;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        MachineCyclesPostRequestBody machineCycles = ; // MachineCyclesPostRequestBody | The machine cycles to be posted
        try {
            apiInstance.postMachineCycles(workplaceId, machineCycles);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#postMachineCycles");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkplaceApi;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        MachineCyclesPostRequestBody machineCycles = ; // MachineCyclesPostRequestBody | The machine cycles to be posted
        try {
            apiInstance.postMachineCycles(workplaceId, machineCycles);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#postMachineCycles");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workplaceId = workplaceId_example; // UUID of a workplace
MachineCyclesPostRequestBody *machineCycles = ; // The machine cycles to be posted

WorkplaceApi *apiInstance = [[WorkplaceApi alloc] init];

// Post machine cycles
[apiInstance postMachineCyclesWith:workplaceId
    machineCycles:machineCycles
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.WorkplaceApi()

var workplaceId = workplaceId_example; // {String} UUID of a workplace

var machineCycles = ; // {MachineCyclesPostRequestBody} The machine cycles to be posted


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.postMachineCycles(workplaceId, machineCycles, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class postMachineCyclesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkplaceApi();
            var workplaceId = workplaceId_example;  // String | UUID of a workplace
            var machineCycles = new MachineCyclesPostRequestBody(); // MachineCyclesPostRequestBody | The machine cycles to be posted

            try
            {
                // Post machine cycles
                apiInstance.postMachineCycles(workplaceId, machineCycles);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkplaceApi.postMachineCycles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkplaceApi();
$workplaceId = workplaceId_example; // String | UUID of a workplace
$machineCycles = ; // MachineCyclesPostRequestBody | The machine cycles to be posted

try {
    $api_instance->postMachineCycles($workplaceId, $machineCycles);
} catch (Exception $e) {
    echo 'Exception when calling WorkplaceApi->postMachineCycles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkplaceApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkplaceApi->new();
my $workplaceId = workplaceId_example; # String | UUID of a workplace
my $machineCycles = WWW::SwaggerClient::Object::MachineCyclesPostRequestBody->new(); # MachineCyclesPostRequestBody | The machine cycles to be posted

eval { 
    $api_instance->postMachineCycles(workplaceId => $workplaceId, machineCycles => $machineCycles);
};
if ($@) {
    warn "Exception when calling WorkplaceApi->postMachineCycles: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkplaceApi()
workplaceId = workplaceId_example # String | UUID of a workplace
machineCycles =  # MachineCyclesPostRequestBody | The machine cycles to be posted

try: 
    # Post machine cycles
    api_instance.post_machine_cycles(workplaceId, machineCycles)
except ApiException as e:
    print("Exception when calling WorkplaceApi->postMachineCycles: %s\n" % e)

Parameters

Path parameters
Name Description
workplaceId*
String
UUID of a workplace
Required
Body parameters
Name Description
machineCycles *

Responses

Status: 202 - Machine cycles accepted

Status: 204 - Machine cycles posted

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error


updateRecordedOperatingState

Update a recorded operating state

This method is used to specify a recorded operating state or to replace undefined stoppages with a detailed operating state stating the reason for the downtime.


/workplaces/{workplaceId}/recordedOperatingStates/update

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/workplaces/{workplaceId}/recordedOperatingStates/update"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkplaceApi;

import java.io.File;
import java.util.*;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        RecordedOperatingStateUpdateRequestBody operatingStateDetails = ; // RecordedOperatingStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes
        try {
            apiInstance.updateRecordedOperatingState(workplaceId, operatingStateDetails);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#updateRecordedOperatingState");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkplaceApi;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        RecordedOperatingStateUpdateRequestBody operatingStateDetails = ; // RecordedOperatingStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes
        try {
            apiInstance.updateRecordedOperatingState(workplaceId, operatingStateDetails);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#updateRecordedOperatingState");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workplaceId = workplaceId_example; // UUID of a workplace
RecordedOperatingStateUpdateRequestBody *operatingStateDetails = ; // Operating state with details of the causes of malfunctions and downtimes

WorkplaceApi *apiInstance = [[WorkplaceApi alloc] init];

// Update a recorded operating state
[apiInstance updateRecordedOperatingStateWith:workplaceId
    operatingStateDetails:operatingStateDetails
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.WorkplaceApi()

var workplaceId = workplaceId_example; // {String} UUID of a workplace

var operatingStateDetails = ; // {RecordedOperatingStateUpdateRequestBody} Operating state with details of the causes of malfunctions and downtimes


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateRecordedOperatingState(workplaceId, operatingStateDetails, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateRecordedOperatingStateExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkplaceApi();
            var workplaceId = workplaceId_example;  // String | UUID of a workplace
            var operatingStateDetails = new RecordedOperatingStateUpdateRequestBody(); // RecordedOperatingStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes

            try
            {
                // Update a recorded operating state
                apiInstance.updateRecordedOperatingState(workplaceId, operatingStateDetails);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkplaceApi.updateRecordedOperatingState: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkplaceApi();
$workplaceId = workplaceId_example; // String | UUID of a workplace
$operatingStateDetails = ; // RecordedOperatingStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes

try {
    $api_instance->updateRecordedOperatingState($workplaceId, $operatingStateDetails);
} catch (Exception $e) {
    echo 'Exception when calling WorkplaceApi->updateRecordedOperatingState: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkplaceApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkplaceApi->new();
my $workplaceId = workplaceId_example; # String | UUID of a workplace
my $operatingStateDetails = WWW::SwaggerClient::Object::RecordedOperatingStateUpdateRequestBody->new(); # RecordedOperatingStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes

eval { 
    $api_instance->updateRecordedOperatingState(workplaceId => $workplaceId, operatingStateDetails => $operatingStateDetails);
};
if ($@) {
    warn "Exception when calling WorkplaceApi->updateRecordedOperatingState: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkplaceApi()
workplaceId = workplaceId_example # String | UUID of a workplace
operatingStateDetails =  # RecordedOperatingStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes

try: 
    # Update a recorded operating state
    api_instance.update_recorded_operating_state(workplaceId, operatingStateDetails)
except ApiException as e:
    print("Exception when calling WorkplaceApi->updateRecordedOperatingState: %s\n" % e)

Parameters

Path parameters
Name Description
workplaceId*
String
UUID of a workplace
Required
Body parameters
Name Description
operatingStateDetails *

Responses

Status: 202 - Operating state details accepted

Status: 204 - Operating state details updated

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error


updateWorkplaceState

Update the current operating state of a workplace

This method allows a machine controller or a reporting employee to inform the IoT platform that a workplace has changed its operating state. A two-value signal can be sent, which only distinguishes between production and downtime, or a detailed operating state can be transmitted, stating the reasons for a downtime.


/workplaces/{workplaceId}/{workplaceStateId}

Usage and SDK Samples

curl -X POST "https://localhost:24080/ffwebservices/hub/v1/workplaces/{workplaceId}/{workplaceStateId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.WorkplaceApi;

import java.io.File;
import java.util.*;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        
        // Configure OAuth2 access token for authorization: oauth2schema
        OAuth oauth2schema = (OAuth) defaultClient.getAuthentication("oauth2schema");
        oauth2schema.setAccessToken("YOUR ACCESS TOKEN");

        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        String workplaceStateId = workplaceStateId_example; // String | ID of a two-value state to which the worplace changes
        WorkplaceStateUpdateRequestBody operatingStateDetails = ; // WorkplaceStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes
        try {
            workplace result = apiInstance.updateWorkplaceState(workplaceId, workplaceStateId, operatingStateDetails);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#updateWorkplaceState");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.WorkplaceApi;

public class WorkplaceApiExample {

    public static void main(String[] args) {
        WorkplaceApi apiInstance = new WorkplaceApi();
        String workplaceId = workplaceId_example; // String | UUID of a workplace
        String workplaceStateId = workplaceStateId_example; // String | ID of a two-value state to which the worplace changes
        WorkplaceStateUpdateRequestBody operatingStateDetails = ; // WorkplaceStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes
        try {
            workplace result = apiInstance.updateWorkplaceState(workplaceId, workplaceStateId, operatingStateDetails);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling WorkplaceApi#updateWorkplaceState");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];

// Configure OAuth2 access token for authorization: (authentication scheme: oauth2schema)
[apiConfig setAccessToken:@"YOUR_ACCESS_TOKEN"];

String *workplaceId = workplaceId_example; // UUID of a workplace
String *workplaceStateId = workplaceStateId_example; // ID of a two-value state to which the worplace changes
WorkplaceStateUpdateRequestBody *operatingStateDetails = ; // Operating state with details of the causes of malfunctions and downtimes (optional)

WorkplaceApi *apiInstance = [[WorkplaceApi alloc] init];

// Update the current operating state of a workplace
[apiInstance updateWorkplaceStateWith:workplaceId
    workplaceStateId:workplaceStateId
    operatingStateDetails:operatingStateDetails
              completionHandler: ^(workplace output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var BridgeIoTHub = require('bridge_io_t_hub');
var defaultClient = BridgeIoTHub.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth2schema
var oauth2schema = defaultClient.authentications['oauth2schema'];
oauth2schema.accessToken = "YOUR ACCESS TOKEN"

var api = new BridgeIoTHub.WorkplaceApi()

var workplaceId = workplaceId_example; // {String} UUID of a workplace

var workplaceStateId = workplaceStateId_example; // {String} ID of a two-value state to which the worplace changes

var opts = { 
  'operatingStateDetails':  // {WorkplaceStateUpdateRequestBody} Operating state with details of the causes of malfunctions and downtimes
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateWorkplaceState(workplaceId, workplaceStateId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateWorkplaceStateExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2schema
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new WorkplaceApi();
            var workplaceId = workplaceId_example;  // String | UUID of a workplace
            var workplaceStateId = workplaceStateId_example;  // String | ID of a two-value state to which the worplace changes
            var operatingStateDetails = new WorkplaceStateUpdateRequestBody(); // WorkplaceStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes (optional) 

            try
            {
                // Update the current operating state of a workplace
                workplace result = apiInstance.updateWorkplaceState(workplaceId, workplaceStateId, operatingStateDetails);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling WorkplaceApi.updateWorkplaceState: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure OAuth2 access token for authorization: oauth2schema
Swagger\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

$api_instance = new Swagger\Client\Api\WorkplaceApi();
$workplaceId = workplaceId_example; // String | UUID of a workplace
$workplaceStateId = workplaceStateId_example; // String | ID of a two-value state to which the worplace changes
$operatingStateDetails = ; // WorkplaceStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes

try {
    $result = $api_instance->updateWorkplaceState($workplaceId, $workplaceStateId, $operatingStateDetails);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling WorkplaceApi->updateWorkplaceState: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::WorkplaceApi;

# Configure OAuth2 access token for authorization: oauth2schema
$WWW::SwaggerClient::Configuration::access_token = 'YOUR_ACCESS_TOKEN';

my $api_instance = WWW::SwaggerClient::WorkplaceApi->new();
my $workplaceId = workplaceId_example; # String | UUID of a workplace
my $workplaceStateId = workplaceStateId_example; # String | ID of a two-value state to which the worplace changes
my $operatingStateDetails = WWW::SwaggerClient::Object::WorkplaceStateUpdateRequestBody->new(); # WorkplaceStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes

eval { 
    my $result = $api_instance->updateWorkplaceState(workplaceId => $workplaceId, workplaceStateId => $workplaceStateId, operatingStateDetails => $operatingStateDetails);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling WorkplaceApi->updateWorkplaceState: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# Configure OAuth2 access token for authorization: oauth2schema
swagger_client.configuration.access_token = 'YOUR_ACCESS_TOKEN'

# create an instance of the API class
api_instance = swagger_client.WorkplaceApi()
workplaceId = workplaceId_example # String | UUID of a workplace
workplaceStateId = workplaceStateId_example # String | ID of a two-value state to which the worplace changes
operatingStateDetails =  # WorkplaceStateUpdateRequestBody | Operating state with details of the causes of malfunctions and downtimes (optional)

try: 
    # Update the current operating state of a workplace
    api_response = api_instance.update_workplace_state(workplaceId, workplaceStateId, operatingStateDetails=operatingStateDetails)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling WorkplaceApi->updateWorkplaceState: %s\n" % e)

Parameters

Path parameters
Name Description
workplaceId*
String
UUID of a workplace
Required
workplaceStateId*
String
ID of a two-value state to which the worplace changes
Required
Body parameters
Name Description
operatingStateDetails

Responses

Status: 200 - OK

Status: 202 - Workplace state accepted

Status: 400 - Malformed request

Status: 401 - No or an invalid request token was returned

Status: 403 - Request requires higher privileges than provided by the access token

Status: 500 - Internal server error